/**
 * Created by bgy on 2016/12/1.
 */
import React from 'react';
import {Link} from 'react-router';

class Notice extends React.Component {
  constructor(props){
      super(props);
  }
  render() {
    var divList = this.props.notices.map((notice,i)=>
        <div className="notice" key={notice.id}>
          <img style={{width:'3.1rem'}} src={i == 1?'images/main/inform_green@2x.png':(i==2?'images/main/inform_red@2x.png':'images/main/inform_blue@2x.png') } alt=""/>
          <div className="notice-title-time">
            <span className="notice-topic">{notice.topic}</span>
            <span  className="notice-date">发布时间：{notice.date}</span>
          </div>
        </div>
    );
    return (
      <div className="noticeList">
         {divList}
        <Link to="pPlanList" className="toPlanList">查看更多</Link>
      </div>
    )
  }
}
Notice.defaultProps = {
  noticeList:[]
};
export default Notice;
